import java.util.Scanner;

public class 游游的整数切割 {
    //https://www.nowcoder.com/practice/c01b07fe9623425a806c85cdb6f0e0f7?tpId=376&tqId=10556440&ru=/exam/oj&qru=/ta/15-days-help/question-ranking&sourceUrl=%2Fexam%2Foj%3FquestionJobId%3D10%26subTabName%3Donline_coding_page
    //模拟模拟 + 看起来很难实现起来很简单
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char ch2 = s.charAt(s.length() - 1);
        int sum = 0;
        for(int i = 0;i < s.length() - 1;i++){
            char ch1 = s.charAt(i);
            if((ch1 - '0' + ch2 - '0') % 2 == 0){
                sum++;
            }
        }
        System.out.println(sum);
    }
}
